package cn.e3mall.sso.service.common;

public enum UserCheckEnum {
	UNKNOWN("未知"),USERNAME("用户名"),PHONE("手机号"),EMAIL("邮件");
	
	private final String paramType;

	private UserCheckEnum(String paramType) {
		this.paramType = paramType;
	}

	public String getValue() {
		return paramType;
	}
	
	/**
	 * 数字转为枚举类型
	 * @param value
	 * 			 0:未知/1:用户名/2:手机号/3:邮件
	 *  @return 参数类型枚举
	 * 
	 */
	public static UserCheckEnum valueOf(Integer value) {
		if (value == null || values().length <= value.intValue()) {
			return UNKNOWN;
		}
		return values()[value.intValue()];
	}

}
